JAVA Programming, For Beginners, Learn Coding Fast! by Yao Ray
Author:Yao, Ray [Yao, Ray]
Language: eng
Format: epub
Publisher: Ray Yao 's eBooks & Books
Published: 2020-03-21T16:00:00+00:00
Chapter 6
Inheritance & Modifiers
Inheritance
A class can be extended by a subclass.
class sub-class extends parent-class;
“extends” is used in a sub class extends a parent class.
Example 6.1
class parent_class{ // parent class
// define variable here;
// define method here;
}
class sub_class extends parent_class{ // sub class
// define variable here;
// define method here;
}
Explanation:
“class sub_class extends parent_class” means that a sub class extends a parent class (also called super class).
Sub class can access the variable and method in the parent class, but cannot access the private variable and private method in the parent class.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hands-On Design Patterns with Java by Dr. Edward Lavieri;(2140)
Learn C Programming by Jeff Szuhay(1312)
Java For Testers: Learn Java fundamentals fast by Alan Richardson(1310)
600 Basic Japanese Verbs by Hiro Japanese Center(1049)
MATLAB - Programming with MATLAB for Beginners - A Practical Introduction to Programming and Problem Solving (Matlab for Engineers, MATLAB for Scientists, Matlab Programming for Dummies) by Learning UpSkill(922)
Book 2 by Unknown(852)
Practice Makes Perfect: Basic Spanish by Dorothy Richmond(761)
This Lullaby(753)
Java™ 7: A Beginner's Tutorial (Third Edition) by Budi Kurniawan(708)
Basic Mathematics: An Introduction: Teach Yourself by Graham Alan(690)
Learning Java by Marc Loy(582)
The First 100 Chinese Characters by Alison Matthews & Laurence Matthews(580)
0-In the Beginning by Peter David(565)
Quick And Easy Vector Graphics: Learn the 5 basic skills that will have you creating icons, logos, illustrations and UI in minutes (Graphic Design for Beginners Book 1) by Tsagaris Antonis(546)
Frank and I by Anonymous(543)
Computer Programming: PYTHON: A step-by-step giude to learn the basic concepts of Python Programming Language with practical exercises by Tony Chan(525)
Learn Arduino Programming using 37 sensors for beginners : Practical way to learn Arduino for the year 2017 by Jennifer Williams(511)
Learning Perl by Randal L. Schwartz & Tom Phoenix & brian d foy(510)
Beginning Microsoft SQL Server 2008 Programming by Robert Vieira(495)
